package com.itheima.edu.info.manager.day14;

import java.util.concurrent.CountDownLatch;

public class HaiZi1 implements Runnable{
    private CountDownLatch countDownLatch;

    public HaiZi1(CountDownLatch countDownLatch) {
        this.countDownLatch = countDownLatch;
    }

    @Override
    public void run() {
        for (int i = 0; i < 15; i++) {
            System.out.println(Thread.currentThread().getName()+"吃"+i+"个");

        }
        countDownLatch.countDown();
    }
}
